#ifndef SEARCH_MUSIC_H
#define SEARCH_MUSIC_H

#include "widget_class.h"

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>

class search_music:public Widget_class
{
    Q_OBJECT
public:
    explicit search_music(QWidget *parent = nullptr);
    ~search_music();

    // 设置猫猫头像
    void setCatIcon(const QPixmap &pixmap);
    // 设置搜索按钮图标
    void setSearchButtonIcon(const QPixmap &pixmap);
    // 获取搜索文本
    QString searchText() const;

signals:
    void searchRequested(const QString &text);

private slots:
    void onSearchClicked();

private:
    void setupUI();
    void setupConnections();

    QLabel *catLabel;
    QLineEdit *searchLineEdit;
    QPushButton *searchButton;
    QVBoxLayout *mainLayout;
};

#endif // SEARCH_MUSIC_H
